<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2016/10/12
 * Time: 15:35
 */

namespace iBrand\Component\Balance;

use Illuminate\Support\ServiceProvider;
use Event;

class BalanceServiceProvider extends ServiceProvider
{

    /**
     * bootstrap, add routes
     */
    public function boot()
    {
        if ($this->app->runningInConsole()) {
            $this->registerMigrations();
        }
        Event::subscribe('iBrand\Component\Balance\Listeners\balanceRefundEventListener');
    }

    /**
     * register the service provider
     */
    public function register()
    {

    }

    public function provides()
    {

    }

    /**
     * Register Passport's migration files.
     *
     * @return void
     */
    protected function registerMigrations()
    {
        return $this->loadMigrationsFrom(__DIR__.'/../migrations');
    }
}
